mudbox::ScreenSpacePicker Class Reference

#include <mesh.h>

Inheritance diagram for mudbox::ScreenSpacePicker:

Inheritance graph
[legend]
List of all members.

Detailed Description

ScreenSpacePicker objects are used to translate the user action of clicking in the view into a picked point on the surface of a mesh.

If you need to control the algorithm by which points are picked, you can override this class in a plug-in, and replace Mudbox's version, which is in the plugin called "HWPicker". To create your own:

1. Write a plug-in that defines your own class derived from ScreenSpacePicker.

2. Delete the existing HWPicker plugin, and copy yours into the plug-in folder.

On OSX, this plugin is found in the Mudbox 2010 package, under Contents>MacOS>plugins. On the PC, it is found in the work dir folder, under "plugins"


Public Member Functions

virtual const mudbox::ClassDesc RuntimeClass (void) const
virtual void  SetFramebufferSize (unsigned int iWidth, unsigned int iHeight)
  This is called by Mudbox to inform the object of the size of the visible framebuffer.
virtual bool  Pick (const class Camera *pCamera, float fXPosition, float fYPosition, SurfacePoint &sResult)
  Translates the x,y coordinates of a user mouse-click to a point on surface in the scene.

Static Public Member Functions

const mudbox::ClassDesc StaticClass (void)
mudbox::Node CreateInstances (unsigned int iCount=1)

Member Function Documentation

virtual const mudbox::ClassDesc* mudbox::ScreenSpacePicker::RuntimeClass void   )  const [inline, virtual]
 

Reimplemented from mudbox::Node.

00821 :
const mudbox::ClassDesc* mudbox::ScreenSpacePicker::StaticClass void   )  [static]
 

Reimplemented from mudbox::Node.

mudbox::Node* mudbox::ScreenSpacePicker::CreateInstances unsigned int  iCount = 1  )  [static]
 

Reimplemented from mudbox::Node.

virtual void mudbox::ScreenSpacePicker::SetFramebufferSize unsigned int  iWidth,
unsigned int  iHeight
[virtual]
 

This is called by Mudbox to inform the object of the size of the visible framebuffer.

Parameters:
iWidth  [in] The width of the frame buffer in pixels
iHeight  [in] The height of the frame buffer in pixels
virtual bool mudbox::ScreenSpacePicker::Pick const class Camera pCamera,
float  fXPosition,
float  fYPosition,
SurfacePoint sResult
[virtual]
 

Translates the x,y coordinates of a user mouse-click to a point on surface in the scene.

Parameters:
pCamera  [in] A pointer to the camera that was used to display this view
fXPosition  [in] The X position of the point the user clicked (in pixels)
fYPosition  [in] The Y position of the point the user clicked (in pixels)
sResult  [out] The selected point on the surface

mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker
mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker mudbox::ScreenSpacePicker